package org.example.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;

@PropertySource("classpath:/application-config.properties")
@ConfigurationProperties(prefix = "app")
@Configuration
public class FmFrontedProperties {
    //    该类名称需要保持和application-config.properties中的前缀一致
    private Jwt jwt=new Jwt();

    public Jwt getJwt() {
        return jwt;
    }

    public void setJwt(Jwt jwt) {
        this.jwt = jwt;
    }

    public static class Jwt{
        private long accessJwtExpire;
        private long refreshJwtExpire;
        private String accessKey;
        private String refreshKey;

        public long getAccessJwtExpire() {
            return accessJwtExpire;
        }

        public void setAccessJwtExpire(long accessJwtExpire) {
            this.accessJwtExpire = accessJwtExpire;
        }

        public long getRefreshJwtExpire() {
            return refreshJwtExpire;
        }

        public void setRefreshJwtExpire(long refreshJwtExpire) {
            this.refreshJwtExpire = refreshJwtExpire;
        }

        public String getAccessKey() {
            return accessKey;
        }

        public void setAccessKey(String accessKey) {
            this.accessKey = accessKey;
        }

        public String getRefreshKey() {
            return refreshKey;
        }

        public void setRefreshKey(String refreshKey) {
            this.refreshKey = refreshKey;
        }
    }


}
